{include file="public/head" /}
  
  <body>
    <div class="x-body">
        <form class="layui-form" style="margin-left: 80px;" method="post" action="{:url('contractAdd')}"> 
            <div class="layui-form-item">
                <label for="supplier_id" class="layui-form-label">
                    <span class="x-red">*</span>供货商(所属小区):
                </label>
                <div class="layui-input-inline" style="width: 300px;">
                    <select name="supplier_id" lay-filter="supplier_id" id="supplier_id" lay-verify="required">
                        <option value="">供货商(所属小区)</option>
                        {foreach $supplier as $name}
                        <option value="{$name.id}">{$name.supplier_name}({$name.community_name})</option>
                        {/foreach}
                      </select>
                </div>
            </div>    
            
            <div class="layui-form-item">
                <label for="phone" class="layui-form-label">
                    <span class="x-red">*</span>合同开始时间:
                </label>
                <div class="layui-input-inline">
                        <input class="layui-input" placeholder="开始日期" name="start_time" id="start_time" style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="end_time" class="layui-form-label">
                    <span class="x-red">*</span>合同截止时间:
                </label>
                <div class="layui-input-inline">
                        <input class="layui-input" placeholder="截止日期" name="end_time" id="end_time" style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="con" class="layui-form-label">
                    <span class="x-red">*</span>合同内容:
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="con" name="con" required="" lay-verify="required"
                    autocomplete="off" class="layui-input" style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label">
                </label>
                <button  class="layui-btn" lay-filter="add" lay-submit="">
                    合同添加
                </button>
            </div>
      </form>
    </div>
    <script>
        layui.use('laydate', function(){
            var laydate = layui.laydate;
            
            //执行一个laydate实例
            laydate.render({
            elem: '#start_time' //指定元素
            ,format: 'yyyy-MM-dd HH:mm'
            });

            //执行一个laydate实例
            laydate.render({
            elem: '#end_time' //指定元素
            ,format: 'yyyy-MM-dd HH:mm'
            });
        });
        
    </script>
   
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();</script>
  </body>

</html>